package ecs.dogear.app;


public class AddCommentTransaction implements Transaction {
    
	private int userId;
	private String pageUrl;
	private String commentStr;
	private int commentId;
	private String pageTitle;

	public AddCommentTransaction(int userId, String pageUrl, String commentStr,
			int commentId,String pageTitle) {
		this.userId = userId;
		this.pageUrl = pageUrl;
		this.commentStr = commentStr;
		this.commentId = commentId;
		this.pageTitle = pageTitle;
	}

	public void execute() {
		Comment comment = new Comment(commentStr,pageUrl,commentId,userId,pageTitle);
		CommenterDatabase.addComment(comment);
	}

}
